<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .page{
            display: inline-block;
            padding: 5px;
            margin: 5px;
        }
        .page.active{
            background-color: black;
            color: white;
        }
    </style>
</head>
<body>
    <ul>
        {% for item in li %}
            <li>{{ item }}</li>
        {% endfor %}
    </ul>
    <div>
        <select id="sl" onchange="changepagesize(this)">
            <option value="10">10</option>
            <option value="30">30</option>
            <option value="50">50</option>
            <option value="100">100</option>
        </select>
    </div>
    <div>
        {{ page_str }}
    </div>
<script src="/static/jquery-1.12.4.js"></script>
<script src="/static/jquery.cookie.js"></script>
<script>
    $(function () {
        var v =$.cookie('page_one_count');
        $('#sl').val(v)
    });
    function changepagesize(th) {
        var v = $(th).val();
        $.cookie('page_one_count', v);
        location.reload()
    }
</script>
</body>
</html>